﻿///Name:UserWebRelationAccess类
///Author: 张仪
///Description: 
///Company:河南企汇网信息技术有限公司
///DateTime:2012/6/19 19:21:28


using System;
using System.Data;
using System.Data.SqlClient;
using System.Data.OleDb;
using System.Data.Common ;

namespace DataAccess
{
	/// <summary>
	/// UserWebRelationAccess 的摘要说明。
	/// </summary>
	public class UserWebRelationAccess:BaseAccess
	{
		public UserWebRelationAccess(DBManager  objDBManager):base(objDBManager)
		{
			this.m_TableName ="UserWebRelation";	
			this.m_PKName="intUserWebRelationID";
		}
		public int QueryByWS_ID(ref DataSet obj_Ds,int WS_ID)
		{
			OleDbCommand  obj_Command = new OleDbCommand (m_SelectSql+" WHERE intWSID="+WS_ID.ToString());
			try
			{
				obj_Command.Connection = CurrentlyConnection;
				if(this.CurrentlyTransaction !=null)
				{
					obj_Command.Transaction =CurrentlyTransaction;
				}
			
				OleDbDataAdapter obj_OleDbDataAdapter= new OleDbDataAdapter();	
				try
				{
					obj_OleDbDataAdapter.SelectCommand = obj_Command;
					return obj_OleDbDataAdapter.Fill (obj_Ds,m_TableName); 
				}
				finally
				{
					obj_OleDbDataAdapter.Dispose();
				}
				
			}
			finally
			{
				obj_Command.Dispose();
			}
		}
	}
}
